﻿using DXApplicationTangche.UC.门店下单.DTO;
using DXApplicationTangche.原型;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DXApplicationTangche.DTO.尖山
{
    public class DTO坚山美国订单导入
    {

        private List<OrderDto> orderDtos = new List<OrderDto>();
        
        #region 属性
        internal List<OrderDto> OrderDtos { get => orderDtos; set => orderDtos = value; }
        #endregion

        public Dictionary<String, String> Dic尺寸名称对应 = new Dictionary<String, String>();
        public Dictionary<String, DTO具体设计点> Dic设计点名称对应 = new Dictionary<String, DTO具体设计点>();
        public Dictionary<String, DTO默认设计点> Dic设计点类型名称对应 = new Dictionary<string, DTO默认设计点>();
        public Dictionary<String, 尺寸CV> Dic英文找CV = new Dictionary<string, 尺寸CV>();

        public DTO坚山美国订单导入 build英文找CV()
        {
            this.Dic英文找CV.Add("Neck", new 尺寸CV("SHIRT_CIRCU001", "CIRCU_ITEM_01", "领围"));//领围
            this.Dic英文找CV.Add("Shoulder Width", new 尺寸CV("SHIRT_CIRCU001", "CIRCU_ITEM_07","1/2肩宽"));//肩宽(1/2)
            this.Dic英文找CV.Add("Chest", new 尺寸CV("SHIRT_CIRCU001", "CIRCU_ITEM_02", "1/2胸围"));//胸围(1/2)
            this.Dic英文找CV.Add("Stomach", new 尺寸CV("SHIRT_CIRCU001", "CIRCU_ITEM_05", "1/2腰围"));//腰围(1/2)
            this.Dic英文找CV.Add("Hips", new 尺寸CV("SHIRT_CIRCU001", "SHIRT_CIRCU001", "1/2臀围"));//臀围(1/2)
            this.Dic英文找CV.Add("Length", new 尺寸CV("SHIRT_LENGT002", "LENGT_ITEM_02", "身长"));//身长
            this.Dic英文找CV.Add("Sleeve Length L", new 尺寸CV("SHIRT_LENGT002", "POSTU_ITEM_12", "左长袖总长"));//左长袖总长
            this.Dic英文找CV.Add("Sleeve Length R", new 尺寸CV("SHIRT_LENGT002", "POSTU_ITEM_16", "右长袖总长"));//右长袖总长
            this.Dic英文找CV.Add("Cuff Circumference", new 尺寸CV("SHIRT_CIRCU001", "CIRCU_ITEM_56", "长袖袖口围"));//长袖袖口围
            this.Dic英文找CV.Add("SS: Sleeve Length", new 尺寸CV("SHIRT_CIRCU001", "CIRCU_ITEM_57", "半袖总袖长"));//半袖总袖长
            this.Dic英文找CV.Add("SS: Bicep Circumference", new 尺寸CV("SHIRT_CIRCU001", "CIRCU_ITEM_58", "半袖袖口围"));//半袖袖口围
            this.Dic英文找CV.Add("Cuff Width", new 尺寸CV("SHIRT_CIRCU001", "CIRCU_ITEM_59", "袖口宽度"));//袖口宽度
            return this;
        }
        public DTO坚山美国订单导入 build尺寸名称对应()
        {
            //this.Dic尺寸名称对应.Add(new 尺寸属性("SHIRT_CIRCU001", "CIRCU_ITEM_01"),"Neck");
            //this.Dic尺寸名称对应.Add(new 尺寸属性("SHIRT_CIRCU001", "CIRCU_ITEM_07"),"Shoulder Width");
            //this.Dic尺寸名称对应.Add(new 尺寸属性("SHIRT_CIRCU001", "CIRCU_ITEM_02"), "Chest");
            //this.Dic尺寸名称对应.Add(new 尺寸属性("SHIRT_CIRCU001", "CIRCU_ITEM_05"),"Waist");
            //this.Dic尺寸名称对应.Add(new 尺寸属性("SHIRT_CIRCU001", "CIRCU_ITEM_06"),"Hips \"Hem Around\"" );
            //this.Dic尺寸名称对应.Add(new 尺寸属性("SHIRT_LENGT002", "LENGT_ITEM_02"),"Length ");
            //this.Dic尺寸名称对应.Add(new 尺寸属性("SHIRT_LENGT002", "POSTU_ITEM_07"),"Sleeve Length L");
            //this.Dic尺寸名称对应.Add(new 尺寸属性("SHIRT_LENGT002", "POSTU_ITEM_09"),"Sleeve Length R");
            //this.Dic尺寸名称对应.Add(new 尺寸属性("SHIRT_CIRCU001", "CIRCU_ITEM_17,CIRCU_ITEM_18"),"Cuff Circumference        \"Cuff Length\"");
            //this.Dic尺寸名称对应.Add(new 尺寸属性("SHIRT_LENGT002", "LENGT_ITEM_05,LENGT_ITEM_06"),"Cuff Width");
            //this.Dic尺寸名称对应.Add(new 尺寸属性("SHIRT_LENGT002", "LENGT_ITEM_05,LENGT_ITEM_06"),"SS: Sleeve Length");
            //this.Dic尺寸名称对应.Add(new 尺寸属性("SHIRT_CIRCU001", "CIRCU_ITEM_23,CIRCU_ITEM_24"),"SS: Bicep Circumference");
            this.Dic尺寸名称对应.Add("CIRCU_ITEM_01", "Neck");//领围
            this.Dic尺寸名称对应.Add("CIRCU_ITEM_07", "Shoulder Width");//肩宽(1/2)
            this.Dic尺寸名称对应.Add("CIRCU_ITEM_02", "Chest");//胸围(1/2)
            this.Dic尺寸名称对应.Add("CIRCU_ITEM_05", "Stomach");//腰围(1/2)
            this.Dic尺寸名称对应.Add("CIRCU_ITEM_06", "Hips");//臀围(1/2)
            this.Dic尺寸名称对应.Add("LENGT_ITEM_02", "Length");//身长
            this.Dic尺寸名称对应.Add("POSTU_ITEM_12", "Sleeve Length L");//左长袖总长
            this.Dic尺寸名称对应.Add("POSTU_ITEM_16", "Sleeve Length R");//右长袖总长
            this.Dic尺寸名称对应.Add("CIRCU_ITEM_17", "Cuff Circumference");//长袖袖口围
            this.Dic尺寸名称对应.Add("CIRCU_ITEM_18", "Cuff Circumference");//长袖袖口围
            //this.Dic尺寸名称对应.Add("LENGT_ITEM_05", "Cuff Width");//袖头宽
            //this.Dic尺寸名称对应.Add("LENGT_ITEM_06", "Cuff Width");//袖头宽
            this.Dic尺寸名称对应.Add("POSTU_ITEM_13", "SS: Sleeve Length");//左半袖总袖长
            this.Dic尺寸名称对应.Add("POSTU_ITEM_17", "SS: Sleeve Length");//右半袖总袖长
            this.Dic尺寸名称对应.Add("CIRCU_ITEM_24", "SS: Bicep Circumference");//左半袖袖口围
            this.Dic尺寸名称对应.Add("CIRCU_ITEM_23", "SS: Bicep Circumference");//右半袖袖口围
            return this;
        }

        public DTO坚山美国订单导入 build设计点名称对应()
        {
            this.Dic设计点名称对应.Add("Darts (1)", new DTO具体设计点("KSBA1",""));
            this.Dic设计点名称对应.Add("Plain (2)", new DTO具体设计点("KSBA2", ""));
            this.Dic设计点名称对应.Add("Side Pleats (3)", new DTO具体设计点("KSBA3", ""));
            this.Dic设计点名称对应.Add("Box Pleat (4)", new DTO具体设计点("KSBA4", ""));
            this.Dic设计点名称对应.Add("Seamless (1)", new DTO具体设计点("KSFP1", ""));
            this.Dic设计点名称对应.Add("Standard (2)", new DTO具体设计点("KSFP4", ""));
            this.Dic设计点名称对应.Add("Covered (3)", new DTO具体设计点("KSFP3", ""));
            this.Dic设计点名称对应.Add("D11", new DTO具体设计点("KSD11", ""));
            this.Dic设计点名称对应.Add("D12", new DTO具体设计点("KSD12", ""));
            this.Dic设计点名称对应.Add("D16", new DTO具体设计点("KSD16", ""));
            this.Dic设计点名称对应.Add("D17", new DTO具体设计点("KSD17", ""));
            this.Dic设计点名称对应.Add("D18", new DTO具体设计点("KSD18-BD", ""));
            this.Dic设计点名称对应.Add("D19", new DTO具体设计点("KSD19", ""));
            this.Dic设计点名称对应.Add("D20", new DTO具体设计点("KSD20", ""));
            this.Dic设计点名称对应.Add("D21", new DTO具体设计点("KSD21", ""));
            this.Dic设计点名称对应.Add("D22", new DTO具体设计点("KSD22", ""));
            this.Dic设计点名称对应.Add("D23", new DTO具体设计点("KSD23", ""));
            this.Dic设计点名称对应.Add("D24", new DTO具体设计点("KSD24", ""));
            this.Dic设计点名称对应.Add("Angled (C3)", new DTO具体设计点("KSC31", ""));
            this.Dic设计点名称对应.Add("Squared (C6)", new DTO具体设计点("KSC61", ""));
            this.Dic设计点名称对应.Add("French (C7)", new DTO具体设计点("KSC71", ""));
            this.Dic设计点名称对应.Add("Rounded (C8)", new DTO具体设计点("KSC81", ""));
            this.Dic设计点名称对应.Add("Normal Yoke (1)", new DTO具体设计点("KSBJ1", ""));
            this.Dic设计点名称对应.Add("Split Yoke (2)", new DTO具体设计点("KSBJ2", ""));
            this.Dic设计点名称对应.Add("No Pocket (1)", new DTO具体设计点("KSBP1", ""));
            this.Dic设计点名称对应.Add("Rounded (2)", new DTO具体设计点("KSBP2", ""));
            this.Dic设计点名称对应.Add("Angled (3)", new DTO具体设计点("KSBP3", ""));
            this.Dic设计点名称对应.Add("Script (14 Characters) (1)", new DTO具体设计点("KSF02", ""));
            this.Dic设计点名称对应.Add("Gothic (3 Characters) (2)", new DTO具体设计点("KSF03", ""));
            this.Dic设计点名称对应.Add("Block (3 Characters) (3)", new DTO具体设计点("KSF01", ""));
            this.Dic设计点名称对应.Add("Sleeve (1)", new DTO具体设计点("KSEM4", ""));
            this.Dic设计点名称对应.Add("Chest (2)", new DTO具体设计点("KSEM1", ""));
            this.Dic设计点名称对应.Add("Waist (3)", new DTO具体设计点("KSEM2", ""));
            this.Dic设计点名称对应.Add("Hip (4)", new DTO具体设计点("KSEM3", ""));
            this.Dic设计点名称对应.Add("Pocket (5)", new DTO具体设计点("KSEM6", ""));
            this.Dic设计点名称对应.Add("Cuff (6)", new DTO具体设计点("KSEM5", ""));
            this.Dic设计点名称对应.Add("Navy (1)", new DTO具体设计点("K339", ""));
            this.Dic设计点名称对应.Add("Black (2)", new DTO具体设计点("K402", ""));
            this.Dic设计点名称对应.Add("Blue (3)", new DTO具体设计点("K352", ""));
            this.Dic设计点名称对应.Add("Dark Red (4)", new DTO具体设计点("K520", ""));
            this.Dic设计点名称对应.Add("White (5)", new DTO具体设计点("K161", ""));
            this.Dic设计点名称对应.Add("5.5cm (2)", new DTO具体设计点("FBP_01", ""));
            this.Dic设计点名称对应.Add("4.5cm (1)", new DTO具体设计点("FBP_02", ""));
            this.Dic设计点名称对应.Add("6.5cm (3)", new DTO具体设计点("FBP_03", ""));
            this.Dic设计点名称对应.Add("White (B1)", new DTO具体设计点("KSFB1", ""));
            this.Dic设计点名称对应.Add("Ivory (B2)", new DTO具体设计点("KSFB2", ""));
            this.Dic设计点名称对应.Add("Black (B3)", new DTO具体设计点("KSFB3", ""));
            this.Dic设计点名称对应.Add("6mm (1)", new DTO具体设计点("KSCN2", ""));
            this.Dic设计点名称对应.Add("Edge (2)", new DTO具体设计点("KSCN1", ""));
            this.Dic设计点名称对应.Add("Pleated Standard (1)", new DTO具体设计点("KSFP9", ""));
            this.Dic设计点名称对应.Add("Pleated Covered (2)", new DTO具体设计点("KSFP8", ""));
            this.Dic设计点名称对应.Add("H/H(4)", new DTO具体设计点("KSS1", ""));
            this.Dic设计点名称对应.Add("H/R(3)", new DTO具体设计点("KSS2", ""));
            this.Dic设计点名称对应.Add("R/R(1)", new DTO具体设计点("KSS3", ""));
            this.Dic设计点名称对应.Add("S/S(2)", new DTO具体设计点("KSS4", ""));
            return this;
        }

        public DTO坚山美国订单导入 build设计点类型名称对应()
        {
            this.Dic设计点类型名称对应.Add("Back Style (1)", new DTO默认设计点("SHIRT_DESIGN_SBA", "4SBA", "后背款式"));
            this.Dic设计点类型名称对应.Add("Placket (2)", new DTO默认设计点("SHIRT_DESIGN_SFP", "4SFP", "前门襟"));
            this.Dic设计点类型名称对应.Add("Collar (3)", new DTO默认设计点("SHIRT_DESIGN_SCO", "4SCO", "领型"));
            this.Dic设计点类型名称对应.Add("Cuff (4)", new DTO默认设计点("SHIRT_DESIGN_SCU", "4SCU", "袖口"));
            this.Dic设计点类型名称对应.Add("Yoke (7)", new DTO默认设计点("SHIRT_DESIGN_SBY", "4SBJ", "过肩"));
            this.Dic设计点类型名称对应.Add("Pocket (8)", new DTO默认设计点("SHIRT_DESIGN_SBP", "4SBP", "胸兜"));
            this.Dic设计点类型名称对应.Add("Monogram (9)", new DTO默认设计点("SHIRT_MONOGRAM_SCO", "4SMT", "刺绣"));
            this.Dic设计点类型名称对应.Add("Monogram Font (10)", new DTO默认设计点("SHIRT_MONOGRAM_SMO", "4SMO", "刺绣字体"));
            this.Dic设计点类型名称对应.Add("Monogram Placement (11)", new DTO默认设计点("SHIRT_MONOGRAM_SMP", "4SMP", "刺绣位置"));
            this.Dic设计点类型名称对应.Add("Monogram Color (12)", new DTO默认设计点("SHIRT_MONOGRAM_SMC", "4SMC", "刺绣颜色"));
            this.Dic设计点类型名称对应.Add("Button Placement (13)", new DTO默认设计点("SHIRT_DESIGN_FBP", "FBP", "第一扣位"));
            this.Dic设计点类型名称对应.Add("Button (14)", new DTO默认设计点("SHIRT_DESIGN_SBU", "4SBU", "扣样"));
            this.Dic设计点类型名称对应.Add("Stitch (15)", new DTO默认设计点("SHIRT_DESIGN_SST", "4SST", "明线宽度"));
            this.Dic设计点类型名称对应.Add("Front Design (16)", new DTO默认设计点("SHIRT_DESIGN_SFP", "4SFP", "正面设计"));
            this.Dic设计点类型名称对应.Add("Contrast Collar/Cuff (5)", new DTO默认设计点("4SCON", "", "领/袖配料"));
            this.Dic设计点类型名称对应.Add("Collar and Cuff Hardness (18)", new DTO默认设计点("SHIRT_DESIGN_SSK", "4SSK", "领袖衬布"));
            return this;
        }

    }

    public class 尺寸CV
    {
        public String ITEM_CD { get; set; }
        public String ITEM_VALUE { get; set; }
        public String ITEM_NAME_CN { get; set; }
        public 尺寸CV(String ITEM_CD, String ITEM_VALUE, String ITEM_NAME_CN)
        {
            this.ITEM_CD = ITEM_CD;
            this.ITEM_VALUE = ITEM_VALUE;
            this.ITEM_NAME_CN = ITEM_NAME_CN;
        }
    }

    public class 坚山美国订单回执数据
    {
        #region 变量
        public String SheetName { get; set; }
        public String No { get; set; }
        public String Order_No { get; set; }
        public String Order_ { get; set; }
        public String Customer_Name { get; set; }
        public String Item { get; set; }
        public String Fabric_Number { get; set; }
        public String Order_Date { get; set; }
        public String Staff_Name { get; set; }
        public String Quantity { get; set; }
        public String Email_Address { get; set; }
        public String Mobile_Number { get; set; }
        public String Street_Address { get; set; }
        public String City { get; set; }
        public String State { get; set; }
        public String Zip_Code { get; set; }
        public String Color { get; set; }
        public String Pattern { get; set; }
        public String Price { get; set; }
        public String Option { get; set; }
        public String Subtotal { get; set; }
        public String Tax { get; set; }
        public String Total_Price { get; set; }
        #endregion
        public 坚山美国订单回执数据(DataTable dt)
        {
            String[] _order_ = dt.Rows[1]["Column3"].ToString().Split(' ');
            this.Order_ = dt.Rows[1]["Column2"].ToString() + "-" + _order_[2] + "-" + _order_[0];
            this.Customer_Name = dt.Rows[3]["Column0"].ToString();
            this.Item = dt.Rows[7]["Column0"].ToString();
            this.Fabric_Number = dt.Rows[7]["Column1"].ToString();
            this.Order_Date = dt.Rows[1]["Column1"].ToString();
            this.Staff_Name = dt.Rows[1]["Column0"].ToString();
            this.Quantity = dt.Rows[1]["Column3"].ToString();
            this.Email_Address = dt.Rows[3]["Column1"].ToString();
            this.Mobile_Number = dt.Rows[3]["Column2"].ToString();
            this.Street_Address = dt.Rows[5]["Column0"].ToString();
            this.City = dt.Rows[5]["Column1"].ToString();
            this.State = dt.Rows[5]["Column2"].ToString();
            this.Zip_Code = dt.Rows[5]["Column3"].ToString();
            this.Color = dt.Rows[7]["Column2"].ToString();
            this.Pattern = dt.Rows[7]["Column3"].ToString();
            this.Price = dt.Rows[1]["Column5"].ToString();
            this.Option = dt.Rows[2]["Column5"].ToString();
            this.Subtotal = dt.Rows[3]["Column5"].ToString();
            this.Tax = dt.Rows[4]["Column5"].ToString();
            this.Total_Price = dt.Rows[5]["Column5"].ToString();
            this.SheetName = dt.TableName;
        }
        public 坚山美国订单回执数据(string no, string order_No, string order_, string customer_Name, string item, string fabric_Number, string order_Date, string staff_Name, string quantity, string email_Address, string mobile_Number, string street_Address, string city, string state, string zip_Code, string color, string pattern, string price, string option, string subtotal, string tax, string total_Price)
        {
            No = no;
            Order_No = order_No;
            Order_ = order_;
            Customer_Name = customer_Name;
            Item = item;
            Fabric_Number = fabric_Number;
            Order_Date = order_Date;
            Staff_Name = staff_Name;
            Quantity = quantity;
            Email_Address = email_Address;
            Mobile_Number = mobile_Number;
            Street_Address = street_Address;
            City = city;
            State = state;
            Zip_Code = zip_Code;
            Color = color;
            Pattern = pattern;
            Price = price;
            Option = option;
            Subtotal = subtotal;
            Tax = tax;
            Total_Price = total_Price;
        }
        /// <summary>
        /// 注入订单号
        /// </summary>
        /// <param name="OrderNo"></param>
        /// <returns></returns>
        public 坚山美国订单回执数据 buildOrderNo(String OrderNo)
        {
            this.Order_No = Order_No;
            return this;
        }
        /// <summary>
        /// 注入sheet名
        /// </summary>
        /// <param name="SheetName"></param>
        /// <returns></returns>
        public 坚山美国订单回执数据 buildSheetName(String SheetName)
        {
            this.SheetName = SheetName;
            return this;
        }
    }
}
